package cn.b.sky.user.service.model;

import cn.b.sky.common.model.ImeCommon;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * 
 * <strong>Title : ParameterValue.java<br></strong>
 * <strong>Package : cn.b.sky.user.model<br></strong>
 * <strong>Description : </strong>参数枚举类定义表<br> 
 * <strong>Create on : 2015-8-12 下午2:29:13<br></strong>
 * <p>
 * @author lidapeng<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人 | 修改日期 | 修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public class ParameterValue extends ImeCommon implements Serializable {

  /** 
  * @Fields serialVersionUID : 
  * @creator     :lidapeng
  */
  private static final long serialVersionUID = 1L;

  private Integer id;

  /**
   * 参数编号，parameter对象
   */
  private String parameterCode;

  /**
   * 枚举值
   */
  private String value;

  /**
   * 枚举编号
   */
  private String valueText;

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getParameterCode() {
    return StringUtils.upperCase(parameterCode);
  }

  public void setParameterCode(String parameterCode) {
    this.parameterCode = StringUtils.upperCase(parameterCode);
  }

  public String getValue() {
    return value;
  }

  public void setValue(String value) {
    this.value = value;
  }

  public String getValueText() {
    return valueText;
  }

  public void setValueText(String valueText) {
    this.valueText = valueText;
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((value == null) ? 0 : value.hashCode());
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    ParameterValue other = (ParameterValue) obj;
    if (value == null) {
      if (other.value != null) {
        return false;
      }
    } else if (!value.equals(other.value)) {
      return false;
    }
    return true;
  }

}
